package com.sxu.fileprocess;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;

import com.alibaba.fastjson.JSONArray;

public class Json2File {
	public static void generateJSON2File(String path, JSONArray ja) throws Exception {
		File file = new File(path);
		Writer write = new OutputStreamWriter(new FileOutputStream(file), "utf-8");
		write.write(ja.toString());
		write.flush();
		write.close();
	}
}
